
//安全退出
$('#navbar-collapse-01').on('click','.logout',function(){
	con = confirm('您确定要退出登录吗？');
	if (con==false) {
		return;
	}
	window.location.href="/index.php/admin/login/login_view?logout=true";

});
// $(document).ready(function(){
	//登录
	
	//添加页面
	var tabpanel_ids = new Array();
	$("li[role='presentation']").each(function(){
		var _this = $(this);
		var this_id = _this.children().attr('aria-controls');
		tabpanel_ids.push(this_id);
	});
	$("ul").on('click','.list-group-item',function(){
		var _this = $(this);
		var _id = _this.attr('data-id');
		var _url = _this.attr('data-url');
		if ($.inArray(_id,tabpanel_ids) != -1) {
			return;
		}
		var this_title = _this.children().html();
		var title_html = ' <li role="presentation" class="active"><a href="#'+_id+'" aria-controls="'+_id+'" role="tab" data-toggle="tab">'+this_title+'&nbsp;&nbsp;&nbsp;<span class="fui-cross close kesnClose"></span></a></il>';
		var tab_html = '<div role="tabpanel" class="tab-pane active" id="'+_id+'"><iframe src="'+_url+'" frameborder="0" class="col-md-12" style="min-height:1000px;"></iframe></div>';
		$("li[role='presentation']").each(function(){
			$(this).removeClass('active');
		});
		$("div[role='tabpanel']").each(function(){
			$(this).removeClass('active');
		});
		$('.index_header').find('.nav').append(title_html);
		$('.index_main').find('.tab-content').append(tab_html);
		tabpanel_ids.push(_id);
		loginLosetime();
		});

	//打开页面

	// 关闭页面
	$("ul").on('click','.kesnClose',function(){
		var _this = $(this);
		var tab_pane_id = _this.parent().attr('aria-controls');
		tabpanel_ids.splice($.inArray(tab_pane_id,tabpanel_ids),1);
		$('#'+tab_pane_id).remove();
		_this.parents('li').remove();
	});



// });
